#include <stdio.h>
#include <stdlib.h>
#include <math.h>
 
int quad(double a, double b, double c, double * p1, double * p2)
{
        double D = b * b - 4 * a * c;
 
        if (D > 0)
        {
                D = sqrt(D);
                *p1 = (-b - D) / (2 * a); 
                *p2 = (-b + D) / (2 * a);
                return 2;
        }
        else if (D == 0)
        {
                *p1 = -b / (2 * a); 
                return 1;
        }
 
        return 0;
}
 
 
void main(void)
{
        double a, b, c, x1, x2;
        int kor, check;
        printf("VVedite A,B,C\n");
        check = scanf("%lf %lf %lf", &a, &b, &c);
        if (check != 3)
        {
                printf("Incorrect input. Goodbye!\n");
                return;
        }
 
      
        kor = quad(a, b, c, &x1, &x2); 
 
        switch (kor)
        {
        case 2:
                printf("roots: %.15g %.15g\n", x1, x2);
                break;
        case 1:
                printf("root: %.15g\n", x1);
                break;
        default:
                printf("no roots.\n");
        }
 
        system("PAUSE");
}